﻿#pragma once

class CIndexWrapper : public CBaseWrapper
{
public:
    IndexBuffer1 *indexBuf;   // x7 -> 28
    IndexBuffer2 *indexBuf20; // x8 -> 32
    IndexBuffer2 *indexBuf2;  // x9 -> 36
    int32_t indexCount2;      // x10 -> 40
    int32_t currentTail2;     // x11 -> 44
    int32_t index1Flag;       // x12 -> 48
    int32_t baseTail;         // x13 -> 52
    int32_t index2Flag;       // x14 -> 56

    CIndexWrapper();

    void printSelf(char *captionUpper, int32_t deep);

    // sub_1001A110
    CIndexWrapper *init(int32_t len);

    // sub_1001E140
    CIndexWrapper *init_(int32_t len);

    // sub_10002AE4
    CIndexWrapper *initData();

    // sub_10002B4D
    IndexBuffer1 *initHead();

    // sub_1001B290
    CBaseWrapper *close(char flag);

    // sub_10002A53
    CBaseWrapper *close();

    // sub_1001A320
    int32_t isIndex1Valid();

    // sub_1001A3F0
    int32_t isIndex2Valid();

    // sub_10002C49
    int32_t cleanIndexBuf2();

    // sub_1001A080
    IndexBuffer1 *getCurrentIndexBuf();

    // sub_10002FCF
    int32_t setResultTypeCode(TDLLResultListItem *pRes, int32_t tail);

    // sub_1001AA20
    CIndexWrapper *setIndexBuf();

    // sub_1001AA40
    int32_t *cleanIndexBuf();

    // sub_10002CB6
    int32_t getIndexHead();

    // sub_10002CEA
    int32_t getHeadTail1(int32_t *head, int32_t *tail, int32_t *head2, int32_t *tail2);

    // sub_10002E48
    int32_t getHeadTail2(int32_t *head, int32_t *tail);

    // sub_10002BA6
    int32_t createIndexBuf2();

    // sub_1001A640
    int32_t isCurrentTail2Zero();
};
